package com.ftg.learn.chapter14;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;

/**
 * @author kangjx
 * @createTime 2022/8/16
 */
@Data
@AllArgsConstructor
public class Student implements Comparable<Student>, Serializable {

    private static final long serialVersionUID = -1L;

    String name;

    int sno;

    int age;

    @Override
    public int compareTo(Student o) {
        return this.getAge() - o.getAge();
    }
    //c -
//    redis - > abc,new Student();  流
}
